package com.baosight.risk.mapper.riri;

import com.baosight.risk.base.mapper.BaseMapper;
import com.baosight.risk.service.fltd.entity.FltdProcess;
import com.baosight.risk.service.riri.entity.RiriImpRisk;
import com.baosight.risk.service.riri.entity.RiriRisk;
import com.baosight.risk.service.riri.entity.RiriYyRisk;
import com.baosight.risk.service.riri.vo.*;
import com.baosight.risk.service.xtri.entity.TXtriTempSystem;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface RiriRiskMapper extends BaseMapper<RiriRisk> {

    List<RiriRisk> selectRiriRisk(@Param("ririRisk") RiriRiskVO ririRisk);
    List<RiriRisk> queryRisk(@Param("ririRisk") RiriRiskVO ririRisk);

    List<RiriYyRisk> selectRiriYyRisk(@Param("ririYyRisk") RiriYyRisk ririYyRisk);

    RiriYyRisk queryYyById(@Param("id") String id);

    RiriImpRisk queryImpById(@Param("id") String id);

    Integer deleteYyById(@Param("id") String id, @Param("deleteFlag") String deleteFlag, @Param("deleteTime") Date deleteTime,@Param("deleteBy") String deleteBy);

    Integer deleteImpById(@Param("id") String id, @Param("deleteFlag") String deleteFlag, @Param("deleteTime") Date deleteTime,@Param("deleteBy") String deleteBy);

    List<RiriImpRisk> selectRiriImpRisk(@Param("ririImpRisk") RiriImpRisk ririImpRisk);

    List<RiriRisk> checkRiriRisk(@Param("ririRisk") RiriRisk ririRisk);

    List<RiriYyRisk> checkRiriYyRisk(@Param("ririYyRisk") RiriYyRisk ririYyRisk);

    void insertRiRiImpRisk(@Param("ririImpRisk") RiriImpRisk ririImpRisk);

    void insertRiRiYyRisk(@Param("ririYyRisk") RiriYyRisk ririYyRisk);
    
    Integer updateByRiskId(@Param("ririYyRisk") RiriYyRisk ririYyRisk);

    Integer updateByImpRiskId(@Param("ririImpRisk") RiriImpRisk ririImpRisk);
    void saveProcessExt1(@Param("process") FltdProcess process);

    List<RiriRisk> getRiriRiskByIds(List<String> ids);

    Integer deleteById(@Param("id") String id, @Param("status") String status, @Param("statusName") String statusName);

    Integer updateByRisk(@Param("riaaRiskVO") RiaaRiskVO riaaRiskVO);

    List<RiriRisk> selectTopThree(@Param("riskTopThree") RiskTopThreeVO riskTopThree);

    Integer updateStatus(@Param("ids") List<String> ids,
                         @Param("status") String status,
                         @Param("stausName") String stausName);

    Integer updateYyStatus(@Param("ids") List<String> ids,
                         @Param("status") String status,
                         @Param("stausName") String stausName);

    Integer updateImpStatus(@Param("ids") List<String> ids,
                           @Param("status") String status,
                           @Param("stausName") String stausName);
    Integer updateAuditDate(@Param("ids") List<String> ids,@Param("auditDate") Date auditDate);

    Integer queryMax(@Param("acctYear") String acctYear);

    Integer selectCountHisId(@Param("hisRiskId") String hisRiskId);

    List<RiriRisk> queryByYear(@Param("riskNo") String riskNo);

    List<RiRiRiskDetailVO> selectRiRiRiskDetails(@Param("vo") RiRiRiskDetailParamVO vo);

    List<RiriRisk> exportExcelRiriRisk(@Param("ririRisk") RiriRiskVO riskVO);

    List<RiriRisk> queryRiriRiskData(@Param("ririRisk") RiriRiskVO RiriRiskVO);

    List<RiriRisk> queryImportantRiskData(@Param("riskTopThree") RiskTopThreeVO riskTopThree);

    List<FltdProcess> queryProcessExt1(@Param("process") FltdProcess process);
}